feat(wasm-utxo): add support for utxolib signature size compatibility#98
Merged
OttoAllmendinger merged 1 commit intomasterfrom Jan 14, 2026
Merged
feat(wasm-utxo): add support for utxolib signature size compatibility#98OttoAllmendinger merged 1 commit intomasterfrom
OttoAllmendinger merged 1 commit intomasterfrom
Conversation
5984652 to
5eb516a
Compare
Adds compatibility mode to make input size estimates match @bitgo/unspents. This allows wasm-utxo to produce the same transaction size estimates as utxo-lib when needed, while still supporting accurate min/max bounds. The key change is using 72-byte signatures for ECDSA inputs in compat mode instead of 73-byte for the max calculation, which matches @bitgo/unspents behavior. The implementation also replicates specific encoding choices used in utxo-lib. Issue: BTC-2908 Co-authored-by: llm-git <llm-git@ttll.de>
5eb516a to
f4575be
Compare
davidkaplanbitgo
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add utxolibCompat option to Dimensions to match @bitgo/unspents vSize
calculations. This allows exact fee estimation compatibility with the
legacy library by using 72-byte signatures instead of 73-byte max.
The implementation handles encoding differences like OP_PUSHDATA2 for
redeemScripts, which affects weight calculations and virtual sizes.
BTC-2908